package com.woniu.platform.contorller;

import com.woniu.aop.OperationLogAnnotation;
import com.woniu.core.entity.CoreEnterprise;
import com.woniu.core.entity.vo.CoreEnterpriseVO;
import com.woniu.core.service.CoreEnterpriseService;
import com.woniu.util.utils.HttpResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("PlatformCoreEnterprise")
public class PlatformCoreEnterpriseController {
    @Autowired
    private CoreEnterpriseService coreEnterpriseService;

    /**
     *核心企业录入
     * @param coreEnterprise
     * @return
     */
    @PostMapping ("insertCore")
    @OperationLogAnnotation(operModul = "平台-新增核心企业",operType = "新增",operDesc = "新增一个核心企业")//操作日志注解
    public HttpResult<?> insertCore(@RequestBody CoreEnterprise coreEnterprise){
        return coreEnterpriseService.insertCore(coreEnterprise);
    }


    /**
     * 通过属性查询核心企业
     * @param coreEnterpriseVO
     * @return
     */
    @PostMapping ("selectCore")
    @OperationLogAnnotation(operModul = "平台-查询核心企业",operType = "查询",operDesc = "查询符合条件的核心企业")//操作日志注解
    public HttpResult<?> selectCore(CoreEnterpriseVO coreEnterpriseVO){
        return coreEnterpriseService.selectCore(coreEnterpriseVO);
    }

}
